magic = function (){
	 return magic.init();
}
magic.prototype = {
	show: function(){
		magic.closed = false;
		console.log('show magic!');
	},
	disappear: function(){
		if(magic.closed==0){
			magic.closed=1;
		}
	},
	checker: function(){
		var holder = document.getElementsByClassName('box_controls_wrap');
      	if (holder.length > 0){
 			if(magic.closed){
 				magic.show();
 			}
 		}else{
 				magic.disappear();
 			}
	},
	timer: null,
	closed: 1,
	init: function(){
		magic.timer = setInterval('magic.checker();', 500);
	}

}
magic();